{include file="public/header" /}
<article class="page-container">
    <form action="" method="post" class="form form-horizontal" id="form-add">
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2"><span class="c-red">*</span>编号：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$row.id|default=''}" placeholder="" id="id" name="id" readonly>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2"><span class="c-red">*</span>订单号：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$row.transaction_no|default=''}" placeholder="" id="transaction_no" name="transaction_no" readonly>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2"><span class="c-red">*</span>金额：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$row.amount|default=''}" placeholder="" id="amount" name="amount" readonly>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2"><span class="c-red">*</span>手续费：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$row.fee|default=''}" placeholder="" id="fee" name="fee" readonly>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2"><span class="c-red">*</span>转出地址(from)：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$row.from_address|default=''}" placeholder="" id="from_address" name="from_address" readonly>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2"><span class="c-red">*</span>提币到(to)：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$row.to_address|default=''}" placeholder="" id="to_address" name="to_address" readonly>
            </div>
        </div>

        <!--        <div class="row cl">-->
        <!--            <label class="form-label col-xs-2 col-sm-2">-->
        <!--                <span class="c-red">*</span>手机号码：</label>-->
        <!--            <div class="formControls col-xs-8 col-sm-9">-->
        <!--                <input type="text" class="input-text" name="mobile" placeholder="" value="{$row.mobile|default=''}" datatype="*" nullmsg="请填写手机号">-->
        <!--            </div>-->
        <!--            <div class="col-4"> </div>-->
        <!--        </div>-->

        <div class="row cl">
            <label class="form-label col-xs-2 col-sm-2">
                拒绝原因：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" name="cause" id="cause" placeholder="" value="" max="200">
            </div>
            <div class="col-4"> </div>
        </div>


        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                 <span class="label label-success radius" onclick="sp(this,{$row.id},1)">
                        通过</span>
                <span class="label label-danger radius" onclick="sp(this,{$row.id},4)">
                        拒绝</span>
            </div>
        </div>
    </form>
</article>

{include file="public/footer" /}
<script type="text/javascript">
    function sp(obj,id,profit_status){
        if(profit_status == 1){
            var info = '确认要通过审核吗？';
        }else{
            var info = '确认要拒绝用户申请吗？';
        }
        var data =  {};
        data.id=id;
        data.status= profit_status;
        data.cause= $("#cause").val();

        layer.confirm(info,function(index){
            $.ajax({
                type: 'POST',
                url: "{:url('tixianstatus')}",
                data:data,
                dataType: 'json',
                success: function(data){
                    if(data.status == 'y'){
                        layer.msg("操作成功",{icon:1,time:1000,shade: [0.3, '#000']},function(){
                            layer.closeAll();
                            layer.parent.reload();
                        });
                    }else{
                        layer.msg(data.info,{icon:2,time:1000,shade: [0.3, '#000']});
                    }
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }
</script>
